package org.aphasia4j.dao;

import java.util.List;

import org.aphasia4j.dao.core.BaseDao;
import org.aphasia4j.model.Patient;
import org.aphasia4j.model.Task;

/**
 * Dao description for handling {@link Task} related database requests.
 * 
 * @author hillger.t
 */
public interface TaskDao extends BaseDao<Task> {

  /**
   * Selects all {@link Task}s assigned to the given {@link Patient}.
   * 
   * @param patient The {@link Patient} to search with.
   * @return
   */
  public List<Task> findByPatient(Patient patient);

  /**
   * Selects all {@link Task}s linked to the given {@link Patient}'s identifier.
   * 
   * @param patientId The {@link Patient}'s identifier.
   * @return
   */
  public List<Task> findByPatient(long patientId);

  /**
   * Selects all {@link Task}s assigned to the given {@link Patient}'s name.
   * 
   * @param namePart A non casesensitive name part.
   * @return
   */
  public List<Task> findByPatientName(String namePart);
}
